package com.atguigu08.constructor;

/**
 * ClassName: Person
 * Package: com.atguigu08.constructor
 * Description:
 *
 * @Author 姜
 * @Create 2023/11/20 17:50
 * @Version 1.0
 */
public class Person {
    String name;
    int age;

    // 构造器
    public Person() {
        System.out.println("套你猴子");
    }

    // 声明其它的构造器
    public Person(int a) {
        age = a;
    }

    public Person(String n) {
        name = n;
    }

    public void eat() {
        System.out.println("吃喝嫖赌抽");
    }

    public void sleep(int hour) {
        System.out.println("坑蒙拐骗偷" + "每天手冲" + hour + "小时");
    }
}
